package my.springboot.validation.simple;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;


public class Person{  
    
    @NotNull(message="username不能为空")  //此处为校验注解  
    private String username;  
    
    @NotNull(message = "age is null")  //此处为校验注解
    private Integer age;  
    @Valid
    private List<User> users;
    
    public String getUsername() {  
        return username;  
    }  
  
    public void setUsername(String username) {  
        this.username = username;  
    }

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

}  
